﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Topro.Application.Interface
{
    using Topro.Entity;
    using Topro.Entity.Query;
    using Topro.Entity.Request.WarehouseUnit;
    using Topro.Entity.Response.WarehouseUnit;

    /// <summary>
    /// 库位业务接口
    /// </summary>
    public interface WarehouseUnitService
    {
        /// <summary>
        /// 获取库位
        /// </summary>
        /// <param name="id">编号</param>
        /// <returns></returns>
        WarehouseUnitResponse Get(string id);

        /// <summary>
        /// 更新状态
        /// </summary>
        /// <returns></returns>
        JResult UpdateStatus(string id, int status);

        /// <summary>
        /// 保存、修改
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        JResult SaveWarehouseUnit(WarehouseUnitSaveRequest request);

        /// <summary>
        /// 解锁
        /// </summary>
        /// <param name="id">编号</param>
        /// <returns></returns>
        JResult Locked(string id);

        /// <summary>
        /// 解锁
        /// </summary>
        /// <param name="id">编号</param>
        /// <returns></returns>
        JResult OutLocked(string id);

        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        DataGrid<WarehouseUnitQueryResponse> GetPager(WarehouseUnitQuery query);

        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        PagedList<WarehouseUnitQueryResponse> WarehouseUnitQuery(WarehouseUnitQuery query);

        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        DataGrid<WarehouseUnitQueryResponse> Query(WarehouseUnitQuery query);
    }
}
